<% if user_signed_in? %>
  <% if params[:all_projects] == 'y' %>
    <h1><%= t :all, :scope => [:helpers, :headlines, :project]%></h1>
  <% else %>
    <h1><%= t :own, :scope => [:helpers, :headlines, :project]%></h1>
  <% end %>

  <div class="gru-projectlist">
    <% if @projects.empty? %>
      <i><%= t :none, :scope => [:helpers, :messages, :project]%> </i>
    <% else %>
        <% @projects.each do |project| %>
                <p class="gru-projectlist project">
                        <span class="gru-projectlist float name"><%= project.name %></span>
                        <span class="gru-projectlist float url"><%= link_to project.url, "http://" + project.url %></span>
                        <span class="gru-projectlist float status"><span class="gru-projectlist float fieldname"><%= t :status, :scope => [:activerecord, :attributes, :project] %></span> <%= t( project.status, :scope => "activerecord.attributes.values.project.statuses")%></span>
						<span class ="gru-projectlist float progress"><span class="gru-projectlist float fieldname"><%= t :progress, :scope => [:activerecord, :attributes, :project] %></span> <%= project.progress %> &#037;</span>
						<span class="gru-projectlist float details"><%= link_to (t :details, :scope => [:helpers, :navigation, :project]), project %></span>
                </p>
        <% end %>
     <% end %>
  </div>

  <br />

  <%= link_to (t :new, :scope => [:helpers, :navigation, :project]), new_project_path %> &#124;
  <%= link_to (t :all, :scope => [:helpers, :navigation, :project]), :controller => "projects", :action => "index" ,:all_projects => "y" %> &#124;
  <%= link_to (t :own, :scope => [:helpers, :navigation, :project]), projects_path %>

<% else %>
  <h1><%= t :welcome, :scope => [:helpers, :headlines, :project]%> </h1>

      <p><%= t :welcome, :scope => [:helpers, :messages, :project] %>
  <span class="gru-colored-link"><%= link_to (t :login, :scope => [:helpers, :navigation, :project]), new_user_session_path %></span> <%= t :respectively, :scope => [:helpers, :messages, :project] %>
  <span class="gru-colored-link"><%= link_to (t :register, :scope => [:helpers, :navigation, :project]), new_user_registration_path %></span>.</p>
<% end %>
